/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package test;

import java.util.Scanner;

/**
 *
 * @author Administrator
 */
public class Khanh {
     double dAmount=50;
    double bBalance;
    Scanner s=new Scanner(System.in);
    public void deposit(){
        double dDepAmount;
        System.out.print("Enter amount money that you want to deposit");
        dDepAmount=s.nextDouble();
        dAmount=dAmount+dDepAmount;
        System.out.println("In the current, your balance is:"+dAmount);
    }
    public void withdraw(){
        double dWdrAmount;
        System.out.print("Enter amount money thay you want to withdraw:");
        dWdrAmount=s.nextDouble();
        if(dWdrAmount>dAmount)
            System.out.println("Not enough money");
        else
        {
            dAmount = dAmount - dWdrAmount;
            System.out.println("In the current, your balance is:"+dAmount);}

    }
    public double getBalance(){
         return dAmount;
    }
}
